package com.shensi.api.admin.client.station;

import com.shensi.api.admin.client.fallback.monitor.SysLogininforClientFallBack;
import com.shensi.api.admin.domian.applet.dto.PayOrderDto;
import com.shensi.api.admin.domian.station.dto.NonOilCategoryDto;
import com.shensi.api.admin.domian.station.dto.NonOilOrderDto;
import com.shensi.api.admin.domian.station.vo.NonOilOrderVo;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.page.TableDataInfo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = SysLogininforClientFallBack.class)
@Component
public interface NonOilOrderClient {

    /**
     * 分页查询今日订单
     *
     * @param nonOilOrder 筛选条件
     * @return 查询结果
     */
    @PostMapping("/nonOilCategory/todayList")
    public TableDataInfo queryTodayByPage(@RequestBody NonOilOrderDto nonOilOrder);

    @PostMapping("/nonOilCategory/todayStatisticsData")
    public AjaxResult getTodayStatisticsData(@RequestBody NonOilOrderDto nonOilOrder);

    @PostMapping("/nonOilCategory/export")
    @ApiOperation("导出")
    public AjaxResult export(@RequestBody NonOilOrderDto nonOilOrder);

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("/nonOilCategory/queryById/{id}")
    @ApiOperation("通过主键查询单条数据")
    public ResponseEntity<NonOilOrderVo> queryById(@PathVariable("id") Long id);

    /**
     * 新增数据
     *
     * @param nonOilOrder 实体
     * @return 新增结果
     */
    @PostMapping("/nonOilCategory/add")
    @ApiOperation("新增数据")
    public AjaxResult add(@RequestBody NonOilOrderDto nonOilOrder);

    /**
     * 编辑数据
     *
     * @param nonOilOrder 实体
     * @return 编辑结果
     */
    @PutMapping("/nonOilCategory")
    public ResponseEntity<NonOilOrderVo> edit(NonOilOrderDto nonOilOrder);

    /**
     * 删除数据
     *
     * @param id 主键
     * @return 删除是否成功
     */
    @DeleteMapping("/nonOilCategory")
    public ResponseEntity<Boolean> deleteById(Long id);



    @GetMapping("/nonOilCategory/feiePush")
    public AjaxResult feiePush(PayOrderDto payOrder1);

}
